3.3 \(\int (c+d x) (a+a \sec (e+f x)) \, dx\)

Optimal. Leaf size=93 \[ \frac{i a d \text{PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac{i a d \text{PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}-\frac{2 i a (c+d x) \tan ^{-1}\left (e^{i (e+f x)}\right )}{f}+\frac{a (c+d x)^2}{2 d} \]

[Out]

(a*(c + d*x)^2)/(2*d) - ((2*I)*a*(c + d*x)*ArcTan[E^(I*(e + f*x))])/f + (I*a*d*PolyLog[2, (-I)*E^(I*(e + f*x))
])/f^2 - (I*a*d*PolyLog[2, I*E^(I*(e + f*x))])/f^2

________________________________________________________________________________________

Rubi [A]  time = 0.0673857, antiderivative size = 93, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {4190, 4181, 2279, 2391} \[ \frac{i a d \text{PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac{i a d \text{PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}-\frac{2 i a (c+d x) \tan ^{-1}\left (e^{i (e+f x)}\right )}{f}+\frac{a (c+d x)^2}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*(a + a*Sec[e + f*x]),x]

[Out]

(a*(c + d*x)^2)/(2*d) - ((2*I)*a*(c + d*x)*ArcTan[E^(I*(e + f*x))])/f + (I*a*d*PolyLog[2, (-I)*E^(I*(e + f*x))
])/f^2 - (I*a*d*PolyLog[2, I*E^(I*(e + f*x))])/f^2

Rule 4190

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]

Rule 4181

Int[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c + d*x)^m*ArcTanh[E
^(I*k*Pi)*E^(I*(e + f*x))])/f, x] + (-Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))],
 x], x] + Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e,
f}, x] && IntegerQ[2*k] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int (c+d x) (a+a \sec (e+f x)) \, dx &=\int (a (c+d x)+a (c+d x) \sec (e+f x)) \, dx\\ &=\frac{a (c+d x)^2}{2 d}+a \int (c+d x) \sec (e+f x) \, dx\\ &=\frac{a (c+d x)^2}{2 d}-\frac{2 i a (c+d x) \tan ^{-1}\left (e^{i (e+f x)}\right )}{f}-\frac{(a d) \int \log \left (1-i e^{i (e+f x)}\right ) \, dx}{f}+\frac{(a d) \int \log \left (1+i e^{i (e+f x)}\right ) \, dx}{f}\\ &=\frac{a (c+d x)^2}{2 d}-\frac{2 i a (c+d x) \tan ^{-1}\left (e^{i (e+f x)}\right )}{f}+\frac{(i a d) \operatorname{Subst}\left (\int \frac{\log (1-i x)}{x} \, dx,x,e^{i (e+f x)}\right )}{f^2}-\frac{(i a d) \operatorname{Subst}\left (\int \frac{\log (1+i x)}{x} \, dx,x,e^{i (e+f x)}\right )}{f^2}\\ &=\frac{a (c+d x)^2}{2 d}-\frac{2 i a (c+d x) \tan ^{-1}\left (e^{i (e+f x)}\right )}{f}+\frac{i a d \text{Li}_2\left (-i e^{i (e+f x)}\right )}{f^2}-\frac{i a d \text{Li}_2\left (i e^{i (e+f x)}\right )}{f^2}\\ \end{align*}

Mathematica [A]  time = 0.0548351, size = 87, normalized size = 0.94 \[ \frac{a \left (2 i d \text{PolyLog}\left (2,-i e^{i (e+f x)}\right )-2 i d \text{PolyLog}\left (2,i e^{i (e+f x)}\right )+f \left (f x (2 c+d x)-4 i (c+d x) \tan ^{-1}\left (e^{i (e+f x)}\right )\right )\right )}{2 f^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*(a + a*Sec[e + f*x]),x]

[Out]

(a*(f*(f*x*(2*c + d*x) - (4*I)*(c + d*x)*ArcTan[E^(I*(e + f*x))]) + (2*I)*d*PolyLog[2, (-I)*E^(I*(e + f*x))] -
 (2*I)*d*PolyLog[2, I*E^(I*(e + f*x))]))/(2*f^2)

________________________________________________________________________________________

Maple [B]  time = 0.122, size = 186, normalized size = 2. \begin{align*}{\frac{ad{x}^{2}}{2}}+acx-{\frac{2\,iac\arctan \left ({{\rm e}^{i \left ( fx+e \right ) }} \right ) }{f}}-{\frac{ad\ln \left ( 1+i{{\rm e}^{i \left ( fx+e \right ) }} \right ) x}{f}}-{\frac{ad\ln \left ( 1+i{{\rm e}^{i \left ( fx+e \right ) }} \right ) e}{{f}^{2}}}+{\frac{ad\ln \left ( 1-i{{\rm e}^{i \left ( fx+e \right ) }} \right ) x}{f}}+{\frac{ad\ln \left ( 1-i{{\rm e}^{i \left ( fx+e \right ) }} \right ) e}{{f}^{2}}}+{\frac{iad{\it dilog} \left ( 1+i{{\rm e}^{i \left ( fx+e \right ) }} \right ) }{{f}^{2}}}-{\frac{iad{\it dilog} \left ( 1-i{{\rm e}^{i \left ( fx+e \right ) }} \right ) }{{f}^{2}}}+{\frac{2\,iade\arctan \left ({{\rm e}^{i \left ( fx+e \right ) }} \right ) }{{f}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*(a+a*sec(f*x+e)),x)

[Out]

1/2*a*d*x^2+a*c*x-2*I*a/f*c*arctan(exp(I*(f*x+e)))-a/f*d*ln(1+I*exp(I*(f*x+e)))*x-a/f^2*d*ln(1+I*exp(I*(f*x+e)
))*e+a/f*d*ln(1-I*exp(I*(f*x+e)))*x+a/f^2*d*ln(1-I*exp(I*(f*x+e)))*e+I*a/f^2*d*dilog(1+I*exp(I*(f*x+e)))-I*a/f
^2*d*dilog(1-I*exp(I*(f*x+e)))+2*I*a/f^2*d*e*arctan(exp(I*(f*x+e)))

________________________________________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+a*sec(f*x+e)),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [B]  time = 1.97753, size = 927, normalized size = 9.97 \begin{align*} \frac{a d f^{2} x^{2} + 2 \, a c f^{2} x - i \, a d{\rm Li}_2\left (i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right )\right ) - i \, a d{\rm Li}_2\left (i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right ) + i \, a d{\rm Li}_2\left (-i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right )\right ) + i \, a d{\rm Li}_2\left (-i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right ) -{\left (a d e - a c f\right )} \log \left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right ) + i\right ) +{\left (a d e - a c f\right )} \log \left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right ) + i\right ) +{\left (a d f x + a d e\right )} \log \left (i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right ) -{\left (a d f x + a d e\right )} \log \left (i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right ) +{\left (a d f x + a d e\right )} \log \left (-i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right ) -{\left (a d f x + a d e\right )} \log \left (-i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right ) -{\left (a d e - a c f\right )} \log \left (-\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right ) + i\right ) +{\left (a d e - a c f\right )} \log \left (-\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right ) + i\right )}{2 \, f^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+a*sec(f*x+e)),x, algorithm="fricas")

[Out]

1/2*(a*d*f^2*x^2 + 2*a*c*f^2*x - I*a*d*dilog(I*cos(f*x + e) + sin(f*x + e)) - I*a*d*dilog(I*cos(f*x + e) - sin
(f*x + e)) + I*a*d*dilog(-I*cos(f*x + e) + sin(f*x + e)) + I*a*d*dilog(-I*cos(f*x + e) - sin(f*x + e)) - (a*d*
e - a*c*f)*log(cos(f*x + e) + I*sin(f*x + e) + I) + (a*d*e - a*c*f)*log(cos(f*x + e) - I*sin(f*x + e) + I) + (
a*d*f*x + a*d*e)*log(I*cos(f*x + e) + sin(f*x + e) + 1) - (a*d*f*x + a*d*e)*log(I*cos(f*x + e) - sin(f*x + e)
+ 1) + (a*d*f*x + a*d*e)*log(-I*cos(f*x + e) + sin(f*x + e) + 1) - (a*d*f*x + a*d*e)*log(-I*cos(f*x + e) - sin
(f*x + e) + 1) - (a*d*e - a*c*f)*log(-cos(f*x + e) + I*sin(f*x + e) + I) + (a*d*e - a*c*f)*log(-cos(f*x + e) -
 I*sin(f*x + e) + I))/f^2

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int c\, dx + \int c \sec{\left (e + f x \right )}\, dx + \int d x\, dx + \int d x \sec{\left (e + f x \right )}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+a*sec(f*x+e)),x)

[Out]

a*(Integral(c, x) + Integral(c*sec(e + f*x), x) + Integral(d*x, x) + Integral(d*x*sec(e + f*x), x))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (d x + c\right )}{\left (a \sec \left (f x + e\right ) + a\right )}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+a*sec(f*x+e)),x, algorithm="giac")

[Out]

integrate((d*x + c)*(a*sec(f*x + e) + a), x)